From 9aed763981468e6e5779a1d0ec84690b507e1f0b Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Wed, 31 Aug 2005 14:20:56 +0000 Subject: [PATCH] Fix DEBUG_PREEMPT builds. irq_disabled() macro must not use smp_processor_id(). Use the underlying function instead. Signed-off-by: Keir Fraser --- linux-2.6-xen-sparse/include/asm-xen/asm-i386/system.h | 3 ++- linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/system.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/system.h b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/system.h index 5d8ab26fa4..92af14b39c 100644 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/system.h +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/system.h @@ -561,8 +561,9 @@ do { \ #define local_irq_disable() __cli() #define local_irq_enable() __sti() +/* Don't use smp_processor_id: this is called in debug versions of that fn. */ #define irqs_disabled() \ - HYPERVISOR_shared_info->vcpu_data[smp_processor_id()].evtchn_upcall_mask + HYPERVISOR_shared_info->vcpu_data[__smp_processor_id()].evtchn_upcall_mask /* * disable hlt during certain critical i/o operations diff --git a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/system.h b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/system.h index b0ad9c2030..3fc3c550c3 100644 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/system.h +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/system.h @@ -387,8 +387,9 @@ void cpu_idle_wait(void); #define local_irq_disable() __cli() #define local_irq_enable() __sti() +/* Don't use smp_processor_id: this is called in debug versions of that fn. */ #define irqs_disabled() \ - HYPERVISOR_shared_info->vcpu_data[smp_processor_id()].evtchn_upcall_mask + HYPERVISOR_shared_info->vcpu_data[__smp_processor_id()].evtchn_upcall_mask /* * disable hlt during certain critical i/o operations -- 2.30.2